<?php
/**
 * Created by .
 * User: luogan
 * Date: 2022/1/17
 */

namespace app\admin\service;


use app\model\AdminLogModel;

class AdminLogService extends BaseService
{
    public function getList($data)
    {
        $result = AdminLogModel::withSearch($this->searchFields($data),$this->searchData($data))
            ->paginate($this->getLimit($data));
        if (!$result){
            throw new ErrorException();
        }
        return $result;
    }


    public function getInfo($id)
    {
        $result = AdminLogModel::find($id);
        if (!$result){
            throw new ErrorException();
        }
        return $result;
    }
}
